<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<html:html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>订单信息管理</title>
	<META http-equiv=Pragma content=no-cache>
	<META http-equiv=Cache-Control content=no-cache>
	<META http-equiv=Expires content=0>
	<link rel="stylesheet"
		href="<%=request.getContextPath()%>/resource/css/style.css"
		type="text/css">
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/style/scripts/util.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/js/AdyhUtil.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/calendar/DCDA_C03.js"></script>
	<link rel="stylesheet" type="text/css"
		href="<%=request.getContextPath()%>/style/ext/resources/css/ext-all.css" />
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/style/ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/style/ext/ext-all.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/style/scripts/load.js"></script>

	<script type="text/javascript">
	function getMessage() {
	var errorMsg = document.forms[0].errorFlag.value;
	if ("" != errorMsg) {
		//**操作成功！*/
		if (errorMsg == 0) {
			alert("<bean:message key="common.alert1"/>");
		}
		//**操作失败！*/
		if (errorMsg == 1) {
			alert("<bean:message key="common.alert2"/>");
		}
		//**查询无结果！*/
		if (errorMsg == 2) {
			alert("<bean:message key="common.alert3"/>");
		}
		//**系统异常，请联系管理员！*/
		if (errorMsg == 3) {
			alert("<bean:message key="common.alert4"/>");
		}
		document.forms[0].errorFlag.value = "";
	}
}
function chack_state(cotract_number,manufacturing_order,state,type){
	if(state=="1"){
		document.forms[0].cotract_number.value=cotract_number;
		document.forms[0].manufacturing_order.value=manufacturing_order;
		document.forms[0].operationType.value = type;
		document.forms[0].submit();
	}else{
		alert("<bean:message key="common.alert8"/>");
	}
}
function deleteByCode2(id1,id2,state,type) {
	if(state==1){
		if (confirm("\u5220\u9664\u540e\u6570\u636e\u4e0d\u53ef\u6062\u590d!\u662f\u5426\u5220\u9664?")) {
		//if (confirm("do you delete! data is not be resumed after deleting")) {
			document.forms[0].id.value = id1;
			document.forms[0].id1.value = id2;
			document.forms[0].operationType.value = "delete";
			document.forms[0].submit();
		} else {
			return;
		}
	}else{
			alert("<bean:message key="common.alert8"/>");
	}
}
function operation(type) {
				sAlert();
	document.forms[0].operationType.value = type;
	document.forms[0].submit();
}
	</script>
</head>
<body onLoad="getMessage();">
	<html:form method="post" action="/pages/F01/F010102.do"
		enctype="multipart/form-data">
		<html:hidden property="operationType" />
		<html:hidden property="errorFlag" />
		<html:hidden property="id" />
		<html:hidden property="id1" />
		<html:hidden property="language" />
		<!--Begin：表单折叠区块1-->
		<div id="divDlock_2" class="DivBlock">
			<div class="DivHead">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td nowrap class="line_wrap" width="37" height="17">
							<img
								src="<%=request.getContextPath()%>/resource/image/block_unwrap.gif"
								style="CURSOR: hand;" alt="展开/折叠"
								onClick="JavaScript:WrapBlock('divDlock_2');">
						</td>
						<td nowrap class="line_wrap" width="100%" height="17">
							<span class="SpanTitle"><span class="SpanTitle"><bean:message key="F01.F010102" /></span></span>
						</td>
					</tr>
				</table>
			</div>
			<div class="DivTail" style="display:block">
				<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
					<TR>
						<TD NOWRAP>
							<!--订单号码-->
							<bean:message key="F010102.cotract_number" />
						</TD>
						<TD NOWRAP>
							<html:text property="cotract_number" styleClass="MyText" />
						</TD>
						<TD NOWRAP>
							<!--客户名称-->
							<bean:message key="F010102.customer_code" />
						</TD>
						<TD NOWRAP>
							<html:text property="customer_code" styleClass="MyText" size="30" />
						</TD>
						<TD NOWRAP>
							<!--客户类别-->
							<bean:message key="F010102.customer_type" />
						</TD>
						<TD NOWRAP>
							<html:select property="customer_type" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_c_customer_type"
									value="CODE" label="NAME" />
							</html:select>
						</TD>
					</TR>
					<TR>
						<TD NOWRAP>
							<!--工&nbsp;作&nbsp;号-->
							<bean:message key="F010102.manufacturing_order" />
						</TD>
						<TD NOWRAP>
							<html:text property="manufacturing_order" styleClass="MyText" />
						</TD>
						<TD NOWRAP>
							<!--签订时间-->
							<bean:message key="F010102.signaure_date" />
						</TD>
						<TD NOWRAP>
							<html:text property="signaure_date_begin" styleClass="MyText80"
								onclick="return CalendarClick(this)" />
							<bean:message key="F01.common.to" />
							<html:text property="signaure_date_end" styleClass="MyText80"
								onclick="return CalendarClick(this)" />
						</TD>
						<TD NOWRAP>
							<!--产品类别-->
							<bean:message key="F010102.product_type" />
						</TD>
						<TD NOWRAP>
							<html:select property="product_type" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_t_product_type"
									value="CODE" label="NAME" />
							</html:select>
						</TD>
					</TR>
					<TR>
						<TD NOWRAP>
							<!--产品型号-->
							<bean:message key="F010102.model" />
						</TD>
						<TD NOWRAP>
							<html:text property="model" styleClass="MyText" />
						</TD>
						<TD NOWRAP>
							<!--交货时间-->
							<bean:message key="F010102.customer_delivery_date" />
						</TD>
						<TD NOWRAP>
							<html:text property="customer_delivery_date_begin"
								styleClass="MyText80" onclick="return CalendarClick(this)" />
							<bean:message key="F01.common.to" />
							<html:text property="customer_delivery_date_end"
								styleClass="MyText80" onclick="return CalendarClick(this)" />
						</TD>
						<TD NOWRAP>
							<!--是否担保-->
							<bean:message key="F010102.bank_guaranty" />
						</TD>
						<TD NOWRAP>
							<html:select property="bank_guaranty" styleClass="MySelect">
								<html:option value=""></html:option>
								<html:option value="0">是</html:option>
								<html:option value="1">否</html:option>
							</html:select>
						</TD>
					</TR>
					<TR>
					<TR>
						<TD NOWRAP>
							<!--订单状态-->
							<bean:message key="F010102.state" />
						</TD>
						<TD NOWRAP>
							<html:select property="state" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_state_type" value="CODE"
									label="NAME" />
							</html:select>

						</TD>
						<TD NOWRAP>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</TD>
						<TD NOWRAP>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</TD>
						<TD NOWRAP>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</TD>
						<TD NOWRAP>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</TD>
					</TR>
				</TABLE>
			</div>
		</div>
		<!--End：表单折叠区块1-->
		<!--Begin：表单按钮及提示区-->
		<div class="DivBlock">
			<div class="DivButton" style="text-align:right ">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td align="left">
							<input type="button" name="Submit1" class="MyButton"
								value="<bean:message key="common.add"/>"
								onClick="javascript:operation('add');">
						</td>
						<td align="right">
							<input type="button" name="Submit1" class="MyButton"
								value="<bean:message key="common.query"/>"
								onClick="javascript:operation('queryList');">
							<input type="button" name="Submit2" class="MyButton"
								value="<bean:message key="common.back"/>"
								onClick="window.location='../../frame/blank.html'">
						</td>
					</tr>
				</table>
			</div>
		</div>
		<!--End：表单按钮及提示区-->
		<!--Begin：查询列表-->
		<logic:present name="F010102ActionForm" property="list">
			<div>
				<table id="tbList" width="100%" cellpadding="1" cellspacing="1"
					border="0" rules="none" class="ListBackground">
					<tr align="center" class="ListTitle">
						<td nowrap>
							<!--订单号码-->
							<bean:message key="F010102.cotract_number" />
						</td>
						<td align="center" nowrap>
							<!--工&nbsp;作&nbsp;号-->
							<bean:message key="F010102.manufacturing_order" />
						</td>
						<td nowrap>
							<!--产品型号-->
							<bean:message key="F010102.model" />
						</td>
						<td nowrap>
							<!--客户名称-->
							<bean:message key="F010102.customer_code" />
						</td>
						<!--<td nowrap>
							签订时间
							<bean:message key="F010102.signaure_date" />
						</td>-->
						<!--<td nowrap>
							交货时间
							<bean:message key="F010102.customer_delivery_date" />
						</td>-->
						<td nowrap>
							<!--产品类别-->
							<bean:message key="F010102.product_type" />
						</td>
						<td nowrap>
							<!--客户类别-->
							<bean:message key="F010102.customer_type" />
						</td>
						<td nowrap>
							<!-- 	订单状态-->
							<bean:message key="F010102.state" />
						</td>
						<td nowrap>
							<!--操作-->
							<bean:message key="common.operate" />
						</td>
					</tr>
					<logic:iterate id="rowp" name="F010102ActionForm" property="list">
						<tr class="ListRow1">
							<td nowrap align="center">
								<span onMouseOver="Tooltip('查看详细信息', '#333333', '#FFFFFF')"
									onMouseOut="Tooltip()"><a
									href="<%=request.getContextPath()%>/pages/F01/F010102.do?operationType=lookparticular&&cotract_number=<bean:write name="rowp" property="cotract_number" />&manufacturing_order=<bean:write name="rowp" property="manufacturing_order" />"
									target="_self"> <bean:write name="rowp"
											property="cotract_number" /> </a> </span>
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="manufacturing_order" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="model" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="customer_code" />
							</td>
							<!-- 	<td nowrap align="center">
								<bean:write name="rowp" property="signaure_date" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="customer_delivery_date" />
							</td> -->
							<td nowrap align="center">
								<bean:write name="rowp" property="product_type" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="customer_type" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="statename" />
							</td>
							<td nowrap align="center">
								<a
									href="javascript:chack_state('<bean:write name="rowp" property="cotract_number" />','<bean:write name="rowp" property="manufacturing_order" />','<bean:write name="rowp" property="state" />','edit')"
									target="_self"><bean:message key="common.modification" />
								</a>&nbsp;
								<a
									href="javascript:deleteByCode2('<bean:write name="rowp" property="cotract_number" />','<bean:write name="rowp" property="manufacturing_order" />','<bean:write name="rowp" property="state" />','delete')"
									target="_self"><bean:message key="common.delete" /> </a>
							</td>
						</tr>
					</logic:iterate>
				</table>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="fieldset2">
							<bean:define id="actionFormName" value="F010102ActionForm" />
							<%@ include file="../../style/pagejsp/pageable.jsp"%>
						</td>
					</tr>
				</table>
			</div>
		</logic:present>
		<!--End：查询列表-->
	</html:form>
</body>
</html:html>
<script language="javascript" type="text/javascript">
InitForm();
FocusTableRow("tbList",1);
</script>
